﻿
using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
	
	/// <summary>	 
	/// 新订单
	/// </summary>
	public class DbNewOrders
	{ 
		#region DbNewOrders
		/// <summary>
		/// 
		/// </summary>
		public DbNewOrders()
		{
		}
		/// <summary>	 
		/// 
		/// </summary>
		public DbNewOrders(Int32 orderId)
		{
			this.orderId = orderId;
		
		}
		/// <summary>	 
		/// 
		/// </summary>		
		public DbNewOrders(DataRow dr)
		{
			int.TryParse(Convert.ToString(dr["orderId"]),out orderId);
			this.orderSN = Convert.ToString(dr["orderSN"]);
			int.TryParse(Convert.ToString(dr["memberID"]),out memberID);
			this.sessionID = Convert.ToString(dr["sessionID"]);
			this.discount = Convert.ToDecimal(dr["discount"]);
			this.email = Convert.ToString(dr["email"]);
			this.totalPrice = Convert.ToDecimal(dr["totalPrice"]);
			this.shippingPrice = Convert.ToDecimal(dr["shippingPrice"]);
			this.payAdditionalFee = Convert.ToDecimal(dr["payAdditionalFee"]);
			this.shippingTitle = Convert.ToString(dr["shippingTitle"]);
			this.shippingFirstName = Convert.ToString(dr["shippingFirstName"]);
			this.shippingLastName = Convert.ToString(dr["shippingLastName"]);
			this.shippingAddressLine1 = Convert.ToString(dr["shippingAddressLine1"]);
			this.shippingAddressLine2 = Convert.ToString(dr["shippingAddressLine2"]);
			this.shippingCity = Convert.ToString(dr["shippingCity"]);
			this.shippingState = Convert.ToString(dr["shippingState"]);
			this.shippingCountry = Convert.ToString(dr["shippingCountry"]);
			this.shippingPostalCode = Convert.ToString(dr["shippingPostalCode"]);
			this.shippingPhone = Convert.ToString(dr["shippingPhone"]);
			this.billingTitle = Convert.ToString(dr["billingTitle"]);
			this.billingFirstName = Convert.ToString(dr["billingFirstName"]);
			this.billingLastName = Convert.ToString(dr["billingLastName"]);
			this.billingAddressLine1 = Convert.ToString(dr["billingAddressLine1"]);
			this.billingAddressLine2 = Convert.ToString(dr["billingAddressLine2"]);
			this.billingCity = Convert.ToString(dr["billingCity"]);
			this.billingState = Convert.ToString(dr["billingState"]);
			this.billingPostalCode = Convert.ToString(dr["billingPostalCode"]);
			this.billingCountry = Convert.ToString(dr["billingCountry"]);
			this.billingPhone = Convert.ToString(dr["billingPhone"]);
			this.express = Convert.ToString(dr["express"]);
			this.trackingNumber = Convert.ToString(dr["trackingNumber"]);
			if(dr["shippingTime"] != DBNull.Value)
				this.shippingTime = Convert.ToDateTime(dr["shippingTime"]);
			this.firstPrice = Convert.ToDecimal(dr["firstPrice"]);
			this.firstWeight = Convert.ToDecimal(dr["firstWeight"]);
			this.extWeight = Convert.ToDecimal(dr["extWeight"]);
			this.extPrice = Convert.ToDecimal(dr["extPrice"]);
			this.totalWeight = Convert.ToDecimal(dr["totalWeight"]);
			this.comments = Convert.ToString(dr["comments"]);
			this.paymentMethod = Convert.ToString(dr["paymentMethod"]);
			this.paymentOnlineCurrency = Convert.ToString(dr["paymentOnlineCurrency"]);
			if(dr["orderTime"] != DBNull.Value)
				this.orderTime = Convert.ToDateTime(dr["orderTime"]);
			this.orderStatus = Convert.ToInt16(dr["orderStatus"]);
			this.cancelReason = Convert.ToString(dr["cancelReason"]);
			this.cutStock = Convert.ToInt16(dr["cutStock"]);
			this.paymentReturnSN = Convert.ToString(dr["paymentReturnSN"]);
			this.paymentReturnMsg = Convert.ToString(dr["paymentReturnMsg"]);
			
		}
		#endregion
		
		
		#region OrderId
		private Int32 orderId;
		/// <summary>	 
		/// 
		/// AutoInc
		/// PK
		/// </summary>
		public Int32 OrderId
		{
			get{ return orderId; }
			set{ orderId= value; }
		}
		#endregion
		
		#region OrderSN
		private System.String orderSN;
		/// <summary>	 
		/// 订单号
		/// </summary>
		public System.String OrderSN
		{
			get{ return orderSN; }
			set{ orderSN= value; }
		}
		#endregion
		
		#region MemberID
		private Int32 memberID;
		/// <summary>	 
		/// 用户ID
		/// </summary>
		public Int32 MemberID
		{
			get{ return memberID; }
			set{ memberID= value; }
		}
		#endregion
		
		#region SessionID
		private System.String sessionID;
		/// <summary>	 
		/// 会话ID
		/// </summary>
		public System.String SessionID
		{
			get{ return sessionID; }
			set{ sessionID= value; }
		}
		#endregion
		
		#region Discount
		private Decimal discount;
		/// <summary>	 
		/// 折扣
		/// </summary>
		public Decimal Discount
		{
			get{ return discount; }
			set{ discount= value; }
		}
		#endregion
		
		#region Email
		private System.String email;
		/// <summary>	 
		/// 客户邮件
		/// </summary>
		public System.String Email
		{
			get{ return email; }
			set{ email= value; }
		}
		#endregion
		
		#region TotalPrice
		private Decimal totalPrice;
		/// <summary>	 
		/// 总价
		/// </summary>
		public Decimal TotalPrice
		{
			get{ return totalPrice; }
			set{ totalPrice= value; }
		}
		#endregion
		
		#region ShippingPrice
		private Decimal shippingPrice;
		/// <summary>	 
		/// 物流费用
		/// </summary>
		public Decimal ShippingPrice
		{
			get{ return shippingPrice; }
			set{ shippingPrice= value; }
		}
		#endregion
		
		#region PayAdditionalFee
		private Decimal payAdditionalFee;
		/// <summary>	 
		/// 物流手续费
		/// </summary>
		public Decimal PayAdditionalFee
		{
			get{ return payAdditionalFee; }
			set{ payAdditionalFee= value; }
		}
		#endregion
		
		#region ShippingTitle
		private System.String shippingTitle;
		/// <summary>	 
		/// 物流标题
		/// </summary>
		public System.String ShippingTitle
		{
			get{ return shippingTitle; }
			set{ shippingTitle= value; }
		}
		#endregion
		
		#region ShippingFirstName
		private System.String shippingFirstName;
		/// <summary>	 
		/// 收件人陈
		/// </summary>
		public System.String ShippingFirstName
		{
			get{ return shippingFirstName; }
			set{ shippingFirstName= value; }
		}
		#endregion
		
		#region ShippingLastName
		private System.String shippingLastName;
		/// <summary>	 
		/// 收件人名
		/// </summary>
		public System.String ShippingLastName
		{
			get{ return shippingLastName; }
			set{ shippingLastName= value; }
		}
		#endregion
		
		#region ShippingAddressLine1
		private System.String shippingAddressLine1;
		/// <summary>	 
		/// 收件地址1
		/// </summary>
		public System.String ShippingAddressLine1
		{
			get{ return shippingAddressLine1; }
			set{ shippingAddressLine1= value; }
		}
		#endregion
		
		#region ShippingAddressLine2
		private System.String shippingAddressLine2;
		/// <summary>	 
		/// 收件地址2
		/// </summary>
		public System.String ShippingAddressLine2
		{
			get{ return shippingAddressLine2; }
			set{ shippingAddressLine2= value; }
		}
		#endregion
		
		#region ShippingCity
		private System.String shippingCity;
		/// <summary>	 
		/// 收件所在城市
		/// </summary>
		public System.String ShippingCity
		{
			get{ return shippingCity; }
			set{ shippingCity= value; }
		}
		#endregion
		
		#region ShippingState
		private System.String shippingState;
		/// <summary>	 
		/// 收件所在省份
		/// </summary>
		public System.String ShippingState
		{
			get{ return shippingState; }
			set{ shippingState= value; }
		}
		#endregion
		
		#region ShippingCountry
		private System.String shippingCountry;
		/// <summary>	 
		/// 收件所在国家
		/// </summary>
		public System.String ShippingCountry
		{
			get{ return shippingCountry; }
			set{ shippingCountry= value; }
		}
		#endregion
		
		#region ShippingPostalCode
		private System.String shippingPostalCode;
		/// <summary>	 
		/// 收件邮编
		/// </summary>
		public System.String ShippingPostalCode
		{
			get{ return shippingPostalCode; }
			set{ shippingPostalCode= value; }
		}
		#endregion
		
		#region ShippingPhone
		private System.String shippingPhone;
		/// <summary>	 
		/// 收件人联系电话
		/// </summary>
		public System.String ShippingPhone
		{
			get{ return shippingPhone; }
			set{ shippingPhone= value; }
		}
		#endregion
		
		#region BillingTitle
		private System.String billingTitle;
		/// <summary>	 
		/// 帐单标题
		/// </summary>
		public System.String BillingTitle
		{
			get{ return billingTitle; }
			set{ billingTitle= value; }
		}
		#endregion
		
		#region BillingFirstName
		private System.String billingFirstName;
		/// <summary>	 
		/// 对帐单陈
		/// </summary>
		public System.String BillingFirstName
		{
			get{ return billingFirstName; }
			set{ billingFirstName= value; }
		}
		#endregion
		
		#region BillingLastName
		private System.String billingLastName;
		/// <summary>	 
		/// 对帐单名
		/// </summary>
		public System.String BillingLastName
		{
			get{ return billingLastName; }
			set{ billingLastName= value; }
		}
		#endregion
		
		#region BillingAddressLine1
		private System.String billingAddressLine1;
		/// <summary>	 
		/// 对帐单地址1
		/// </summary>
		public System.String BillingAddressLine1
		{
			get{ return billingAddressLine1; }
			set{ billingAddressLine1= value; }
		}
		#endregion
		
		#region BillingAddressLine2
		private System.String billingAddressLine2;
		/// <summary>	 
		/// 对帐单地址2
		/// </summary>
		public System.String BillingAddressLine2
		{
			get{ return billingAddressLine2; }
			set{ billingAddressLine2= value; }
		}
		#endregion
		
		#region BillingCity
		private System.String billingCity;
		/// <summary>	 
		/// 对帐单所在城市
		/// </summary>
		public System.String BillingCity
		{
			get{ return billingCity; }
			set{ billingCity= value; }
		}
		#endregion
		
		#region BillingState
		private System.String billingState;
		/// <summary>	 
		/// 对帐单所在省
		/// </summary>
		public System.String BillingState
		{
			get{ return billingState; }
			set{ billingState= value; }
		}
		#endregion
		
		#region BillingPostalCode
		private System.String billingPostalCode;
		/// <summary>	 
		/// 对帐单所在地区邮编
		/// </summary>
		public System.String BillingPostalCode
		{
			get{ return billingPostalCode; }
			set{ billingPostalCode= value; }
		}
		#endregion
		
		#region BillingCountry
		private System.String billingCountry;
		/// <summary>	 
		/// 对帐单所在国家
		/// </summary>
		public System.String BillingCountry
		{
			get{ return billingCountry; }
			set{ billingCountry= value; }
		}
		#endregion
		
		#region BillingPhone
		private System.String billingPhone;
		/// <summary>	 
		/// 对帐单联系电话
		/// </summary>
		public System.String BillingPhone
		{
			get{ return billingPhone; }
			set{ billingPhone= value; }
		}
		#endregion
		
		#region Express
		private System.String express;
		/// <summary>	 
		/// 发货物流
		/// </summary>
		public System.String Express
		{
			get{ return express; }
			set{ express= value; }
		}
		#endregion
		
		#region TrackingNumber
		private System.String trackingNumber;
		/// <summary>	 
		/// 物流单号
		/// </summary>
		public System.String TrackingNumber
		{
			get{ return trackingNumber; }
			set{ trackingNumber= value; }
		}
		#endregion
		
		#region ShippingTime
		private DateTime shippingTime;
		/// <summary>	 
		/// 发货时间
		/// </summary>
		public DateTime ShippingTime
		{
			get{ return shippingTime; }
			set{ shippingTime= value; }
		}
		#endregion
		
		#region FirstPrice
		private Decimal firstPrice;
		/// <summary>	 
		/// 原始价
		/// </summary>
		public Decimal FirstPrice
		{
			get{ return firstPrice; }
			set{ firstPrice= value; }
		}
		#endregion
		
		#region FirstWeight
		private Decimal firstWeight;
		/// <summary>	 
		/// 原始重量
		/// </summary>
		public Decimal FirstWeight
		{
			get{ return firstWeight; }
			set{ firstWeight= value; }
		}
		#endregion
		
		#region ExtWeight
		private Decimal extWeight;
		/// <summary>	 
		/// 附加重量
		/// </summary>
		public Decimal ExtWeight
		{
			get{ return extWeight; }
			set{ extWeight= value; }
		}
		#endregion
		
		#region ExtPrice
		private Decimal extPrice;
		/// <summary>	 
		/// 附加价格
		/// </summary>
		public Decimal ExtPrice
		{
			get{ return extPrice; }
			set{ extPrice= value; }
		}
		#endregion
		
		#region TotalWeight
		private Decimal totalWeight;
		/// <summary>	 
		/// 总重量
		/// </summary>
		public Decimal TotalWeight
		{
			get{ return totalWeight; }
			set{ totalWeight= value; }
		}
		#endregion
		
		#region Comments
		private System.String comments;
		/// <summary>	 
		/// 备注
		/// </summary>
		public System.String Comments
		{
			get{ return comments; }
			set{ comments= value; }
		}
		#endregion
		
		#region PaymentMethod
		private System.String paymentMethod;
		/// <summary>	 
		/// 支付方式
		/// </summary>
		public System.String PaymentMethod
		{
			get{ return paymentMethod; }
			set{ paymentMethod= value; }
		}
		#endregion
		
		#region PaymentOnlineCurrency
		private System.String paymentOnlineCurrency;
		/// <summary>	 
		/// 支付币种
		/// </summary>
		public System.String PaymentOnlineCurrency
		{
			get{ return paymentOnlineCurrency; }
			set{ paymentOnlineCurrency= value; }
		}
		#endregion
		
		#region OrderTime
		private DateTime orderTime;
		/// <summary>	 
		/// 下单时间
		/// </summary>
		public DateTime OrderTime
		{
			get{ return orderTime; }
			set{ orderTime= value; }
		}
		#endregion
		
		#region OrderStatus
		private Int16 orderStatus;
		/// <summary>	 
		/// 下单状态
		/// </summary>
		public Int16 OrderStatus
		{
			get{ return orderStatus; }
			set{ orderStatus= value; }
		}
		#endregion
		
		#region CancelReason
		private System.String cancelReason;
		/// <summary>	 
		/// 取消订单原因
		/// </summary>
		public System.String CancelReason
		{
			get{ return cancelReason; }
			set{ cancelReason= value; }
		}
		#endregion
		
		#region CutStock
		private Int16 cutStock;
		/// <summary>	 
		/// 
		/// </summary>
		public Int16 CutStock
		{
			get{ return cutStock; }
			set{ cutStock= value; }
		}
		#endregion
		
		#region PaymentReturnSN
		private System.String paymentReturnSN;
		/// <summary>	 
		/// 支付返回单号
		/// </summary>
		public System.String PaymentReturnSN
		{
			get{ return paymentReturnSN; }
			set{ paymentReturnSN= value; }
		}
		#endregion
		
		#region PaymentReturnMsg
		private System.String paymentReturnMsg;
		/// <summary>	 
		/// 支付返回信息
		/// </summary>
		public System.String PaymentReturnMsg
		{
			get{ return paymentReturnMsg; }
			set{ paymentReturnMsg= value; }
		}
		#endregion

	}
}
